$.thread = function(){
	
	var thread = function(script){ 
		this.timer = google.gears.factory.create('beta.timer');
		this.script = script;
	};
		
	thread.prototype.run = function(){
		this.id = this.timer.setTimeout(this.script,0);
	}
	
	thread.prototype.stop = function(){
		this.timer.clearTimeout(this.id);
	}
	
	return thread;
}();
